# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import http
from odoo.http import request
import os
import jinja2
import odoo

BASE_DIR = os.path.dirname(os.path.dirname(__file__))
templateLoader = jinja2.FileSystemLoader(searchpath=BASE_DIR + "/templates")
env = jinja2.Environment(loader=templateLoader)


# class px(odoo.addons.web.controllers.main.Home):
class HrAttendance(http.Controller):
    @http.route('/hpv_crm/index', auth='user', csrf=False)
    def dashboard(self, **post):
        # cr, uid, context, pool = request.cr, odoo.SUPERUSER_ID, request.context, request.env
        # values = {}
        # users = pool['res.users'].sudo().browse(request.session.uid)
        # values['users'] = users

        template = env.get_template('index.html')
        html = template.render()
        return html
    # def px2(self, *args, **kargs):
    #     return http.redirect_with_hash('http://120.79.131.97')

